﻿using System;
using System.Collections;
using System.Web.Caching;
using System.Web.SessionState;

namespace FBGraph.Web
{
    /// <summary>Provides a single abstraction for accessing <see cref="HttpContext" /> and its properties.</summary>
    /// <remarks>
    /// <para>When the <c>System.Web.Abstractions</c> library was released, which is used by ASP.NET MVC, it included a abstractions based on <see cref="HttpContext" />
    /// <see cref="HttpRequest" /> and <see cref="HttpResponse" />. Unfortunately, there was no common interface or base class tying the corresponding classes together,
    /// even though they had nearly identical sets of members. As a result, it is impossible to write a single piece of code that can access either of them. The other option
    /// is duplicating lots of code.</para>
    /// <para>This set of interfaces intends to provide an abstraction to link the old and new HTTP objects. FetchSince there are only a couple parts that the FBGraph client needs
    /// access to, these abstractions currently only provide limited access.</para>
    /// </remarks>
    /// <seealso cref="IHttpRequestWrapper" />
    /// <seealso cref="IHttpResponseWrapper" />
    public interface IHttpContextWrapper
    {
        void Init(Object httpContext);
        IDictionary Items { get; }
        IHttpRequestWrapper Request { get; }
        IHttpResponseWrapper Response { get; }
        IHttpSessionStateWrapper Session { get; }
        Cache Cache { get; }
    }
}